package service

import (
	"context"
	"mall-portalv2/internal/dao"
)

/**
* Author: joker
* TODO: test
* Date: 2022/8/18
* Time: 上午10:37
**/

type Service struct {
	dao *dao.Dao
}

// New a service and return.
func New() (s *Service) {
	s = &Service{
		dao: dao.New(),
	}
	return s
}

// Ping the resource.
func (s *Service) Ping(ctx context.Context) (err error) {
	return s.dao.Ping(ctx)
}

// Close the resource.
func (s *Service) Close() {
	s.dao.Close()
}
